package com.xiyoufang.club.repository;

import com.xiyoufang.club.entity.ClubUserIntegral;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public abstract interface ClubUserIntegralRepository
        extends JpaRepository<ClubUserIntegral, Integer>, JpaSpecificationExecutor<ClubUserIntegral> {
    @Query(nativeQuery = true, value = "SELECT * FROM club_user_integral t WHERE t.club_id=:clubId and t.user_id=:userId  LIMIT 1")
    public abstract ClubUserIntegral getClubUserIntegralByUserIdAndClubId(@Param("clubId") Integer paramInteger1, @Param("userId") Integer paramInteger2);
}
